import React,{Component} from "react";
class Son extends Component{
    render(){
        const {num,userinfo} = this.props
        return(<>
        <span>{this.props.num}</span>
        <span>{this.props.userinfo.name}</span>
        <span>
                {
                    num === 'num' ? (<div>
                        {Object.keys(userinfo).map(k => {
                            return (<div key={k}>
                                {k}-{userinfo[k]}
                            </div>)
                        })}
                    </div>) : '没有权限'
                }
        </span>

        </>)
    }
}


export default Son